<?php
$this->placeholder('main_page')->captureStart();

$publishLevels = DigCms_Service_Item::getPublishLevels();
$publishLevel = isset($this->item->publish_level) ? $this->item->publish_level: 0;
$currentPublishLevel = $publishLevels[$publishLevel];
$contentType = ($this->item->namespace != null && $this->item->namespace != '0') ? $this->type['name'] : 'Default Type';
?>
<div>
    <p><span class="<?= $this->item->namespace; ?>" style="float:right"><ins></ins> <?= $contentType ?></span></p>
    <div class='widget_inner'>
        <div id='form_wrapper'>
        <?php
        //Zend_Debug::dump($this->type);die();
        echo $this->action('form', $this->type['controller'], $this->type['module'], array('id' => $this->item->id));
        ?>
        </div>
    </div>
</div>
<?php
$this->placeholder('main_page')->captureEnd();
$this->tabPane('editor_tabs', $this->placeholder('main_page'), array('title' => 'Edit Item'));
$plugins = DigCms_Service_Plugin::getPlugins();
if(is_array($plugins)) {
    foreach ($plugins as $plugin) {
        $this->tabPane('editor_tabs', $this->digUiBlock($plugin['path'], array('item' => $this->item)), array('title' => $plugin['title']));
    }
}
echo $this->tabContainer('editor_tabs');